<div id="api-doc" *ngIf="api">
    <div id="api-header">
        <h2>
            <span class="api-type">DUBBO</span>
            {{api?.name}}
        </h2>
        <div class="position-right">
            <a *ngIf="envs && user && !apiVersion" class="api-call-link" [routerLink]="['/doc', artifact.id, api.key, 'dubbo']">接口调用</a>
            <a class="api-call-link" [routerLink]="['/doc', artifact.id, api.key, 'mock']">Mock配置</a>
        </div>
    </div>
    <div class="api-doc-item">
        <blockquote class="api-desc" *ngIf="api?.comment" [innerHTML]="api.comment|desc|safeHtml"></blockquote>
    </div>
    <div class="api-doc-item">
        <h3>接口定义：</h3>
        <markdown [data]="api|dubboApi"></markdown>
    </div>

    <div class="api-doc-item" *ngFor="let paramEntity of paramEntities">
        <p class="sub-title">
            参数 {{paramEntity.name}} 实体 {{paramEntity.entity.name}} 结构：
        </p>
        <app-render-table-entity [entity]="paramEntity.entity"></app-render-table-entity>
    </div>

    <div class="api-doc-item">
        <h3>响应：</h3>
        <blockquote class="api-desc" *ngIf="response?.comment">{{response?.comment}}</blockquote>
    </div>
    <div class="api-doc-item">
        <markdown *ngIf="response" [data]="response|entityJson"></markdown>
    </div>

    <div class="api-doc-item">
        <h3>添加包依赖：</h3>
        <h4>maven</h4>

        <markdown [data]="api.artifact|dubboDependencyMaven"></markdown>
        <h4>Gradle</h4>
        <markdown [data]="api.artifact|dubboDependencyGradle"></markdown>
    </div>
    <div class="api-doc-item">
        <h3>Spring注解方式注入：</h3>
        <markdown [data]="api|dubboApiReference"></markdown>
    </div>
</div>
